package cn.holy.app.sztxc.database.dao;

import android.arch.lifecycle.LiveData;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.Query;

import cn.holy.app.sztxc.domain.UserInfoBean;

import static android.arch.persistence.room.OnConflictStrategy.REPLACE;

/**
 * Created by xionghao on 2018/2/23.
 */
@Dao
public interface UserDao {
    @Insert(onConflict = REPLACE)
    void save(UserInfoBean userInfo);
    @Query("SELECT * FROM user_info WHERE id = 1")
    LiveData<UserInfoBean> load();
}
